<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
            var obj =[
                {name:"zhang",count:01,id:001},
                {name:"li",count:01,id:002},
                {name:"wang",count:01,id:003},
            ]
           /*  var res = [];
            for (var i=0;i<obj.length;i++){
                var {name,id}=obj[i];
                res.push({name,id})
            }
            console.log(res) */
            var res = [];
            obj.map(item=>{
                var {id,name} = item;
                res.push({id,name})
            })
            console.log(res)
    </script>
</body>
</html>
